<extend name="Base/common"/>
<block name="otherstyle">

    <link type="text/css" rel="stylesheet" href="__STATIC__/zhongao/css/liuyan.css">
    <script type="text/javascript" src="__STATIC__/zhongao/js/jquery.js"></script>

</block>
<block name="body">

    <div class="banner" style="background: url('/zhongao{$banner|get_cover=path}')">

    </div>


    <!--liuyan-->
    <div class="liuyan">
        <div class="liuyan_bx">
            <h1 class="w1">Contact Form</h1>
            <h2 class="w2">Send Us a Question.We'll Help Get You an Answer.</h2>
            <div class="liuyan_1">

                <div class="a1" ><text>Your Name</text></div>
                <input id="name" type="text" class="input1">
                <p class="p1">*</p>

                <div class="a2_1">
                    <div class="a2" ><text>Your Mobile</text></div>
                    <input id="mobile" maxlength="11" type="text" class="input2">
                </div>

                <div class="a3" ><text>Your Email</text></div>
                <input id="email" type="text" class="input3">
                <p class="p3">*</p>

                <div class="a2_2">
                    <div class="a2" ><text>Subject</text></div>
                    <input id="subject" type="text" class="input2">
                    <p class="p2">*</p>
                </div>

                <div class="a4" ><text>Message</text></div>
                <input id="content" type="text" class="input4">
                <p class="p4">*</p>




                <input type="submit" value="Send" id="sub" class="input6">


            </div>
        </div>
    </div>


    <!--liuyan end-->

    <script>
        $(function(){

            var name="";
            var mobile="";
            var email="";
            var subject="";
            var content="";
            var ret="";
            var msg="";
            $("#sub").click(function(){
                name=$("#name").val();
                if (name=="" ||email=="" || content==""){
                    alert('please check input data');
                    return;
                }
                mobile=$("#mobile").val();
                email=$("#email").val();
                subject=$("#subject").val();
                content=$("#content").val();
                $("#sub").attr("disabled","true");
                $.ajax({
                    type: "POST",
                    url: "__CONTROLLER__/ajaxPostdata",
                    data: {name:name,mobile:mobile,email:email,subject:subject,content:content},
                    success: function(retdata){
                        msg=retdata.msg;
                        alert(msg);
                    }
                });

            });
        });
    </script>
</block>
